using System.Collections;
using System.Data;

namespace ctsu.BaseForms
{
	public class SearchInfo
	{
		private int _id;
		private string _name = "";
		private string _tableName = "";
		private string _sqlCommand = "";
		private string _searchController = "";
		private DataTable _tableSchema;
		private string _searchClassName = "";
		private ArrayList _searchResultCols;
		private ArrayList _searchFields;
		private bool _isUsingFoxpro;

		public SearchInfo()
		{

		}

		public bool IsUsingFoxpro
		{
			get { return this._isUsingFoxpro; }
			set { this._isUsingFoxpro = value; }
		}

		public int ID
		{
			get { return this._id; }
			set { this._id = value; }
		}

		public ArrayList SearchResultCols
		{
			get { return this._searchResultCols; }
			set { this._searchResultCols = value; }
		}

		public DataTable TableSchema
		{
			get { return this._tableSchema; }
			set { this._tableSchema = value; }
		}

		public string SqlCommand
		{
			get { return this._sqlCommand; }
			set { this._sqlCommand = value; }
		}

		public string SearchController
		{
			get { return this._searchController; }
			set { this._searchController = value; }
		}

		public string Name
		{
			get { return this._name; }
			set { this._name = value; }
		}

		public string TableName
		{
			get { return this._tableName; }
			set { this._tableName = value; }
		}

		public string SearchClassName
		{
			get { return this._searchClassName; }
			set { this._searchClassName = value; }
		}

		public ArrayList SearchFields
		{
			get { return _searchFields; }
			set { _searchFields = value; }
		}
	}

	public class SearchResultColumn
	{
		private string _fieldName;
		private string _displayName;
		private int _columnLength;
		private string _fieldType;

		public SearchResultColumn(string fieldName, string displayName)
		{
			this._fieldName = fieldName;
			this._displayName = displayName;
		}

		public string FieldName
		{
			get { return _fieldName; }
			set { _fieldName = value; }
		}

		public string FieldType
		{
			get { return _fieldType; }
			set { _fieldType = value; }
		}

		public string DisplayName
		{
			get { return _displayName; }
			set { _displayName = value; }
		}

		public int ColumnLength
		{
			get { return _columnLength; }
			set { _columnLength = value; }
		}
	}

	public class ReportColumn
	{
		private string _fieldName;
		private string _displayName;
		private int _columnLength;
		private string _fieldType;

		public ReportColumn()
		{
		}

		public ReportColumn(string fieldName, string displayName)
		{
			this._fieldName = fieldName;
			this._displayName = displayName;
		}

		public ReportColumn(string fieldName, string displayName, int columnLength)
		{
			this._fieldName = fieldName;
			this._displayName = displayName;
			this._columnLength = columnLength;
		}

		public string FieldName
		{
			get { return _fieldName; }
			set { _fieldName = value; }
		}

		public string FieldType
		{
			get { return _fieldType; }
			set { _fieldType = value; }
		}

		public string DisplayName
		{
			get { return _displayName; }
			set { _displayName = value; }
		}

		public int ColumnLength
		{
			get { return _columnLength; }
			set { _columnLength = value; }
		}

		public override string ToString()
		{
			return _displayName;
		}

	}
}
